<{include file="common/header.tpl"}>
<section id="spread_one" class="column">

        <h4 class="alert_info">欢迎使用 哇吖管理系统！</h4>


        <article class="module width_3_quarter">
        <header>
            <h3 class="tabs_involved ">新建推广活动</h3>
            <!--
            <select class="spread_tab fl">
              <option value ="1">渠道1</option>
              <option value ="2">渠道2</option>
              <option value ="3">渠道3</option>
              <option value ="4">渠道4444</option>
            </select>
            -->
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
			<form action="create_activity" method="POST" id="addActivityForm">
				<table class="tablesorter" cellspacing="0"> 
				<thead> 
					<tr> 
    					<th>标题</th> 
    					<th>内容</th>
					</tr> 
				</thead> 
				<tbody>
					<tr>
						<td>活动名称:</td>
						<td><input type='text' name='name' value='' class='name'></td>
					</tr> 
					<tr>
						<td>计费单价:</td>
						<td><input type='text' name='price' value='' class='price'> 元</td>
					</tr> 
					<tr>
						<td>推广app(包名):</td>
						<td><input type='text' name='pkgname' value='' class='pkg'></td>
					</tr>
					<tr>
						<td>活动描述:</td>
						<td><textarea rows="10" cols="30" class='desc' name='desc'></textarea></td>
					</tr> 
					<tr>
						<td>计费方式:
							<select name ='pay_type'>
								<option name ='pay_type' value ="CPA">CPA</option>
							</select>
						</td>
						<td>计费标准:
							<select name ='pay_by'>
								<option name='pay_by' value ="downloadcounts">下载量</option>
  								<option name = 'pay_by' value ="newbie">激活</option>
							</select>
						</td>
					</tr> 
					<tr>
						<td colspan = '2'><input type='submit' class='spread_submit' value='提交'></td>
					</tr> 
				</tbody> 
				</table>
			</form>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>			
 <script>
		$('#addActivityForm').submit(function() {
            // form validation.
            if ($('.name').val() == '') {
                alert('活动名称不能为空！');
                return false;
            }
            if ($('.price').val() == '') {
                alert('单价不能为空！');
                return false;
            }
            if ($('.desc').val() == '') {
                alert('活动描述不能为空！');
                return false;
            }
            return confirm('活动已经建立，待推广主管确认');
        }); 
    </script>
<{include file="common/footer.tpl"}>
